package com.example.bookdemo.model;

import com.example.bookdemo.util.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.persistence.Lob;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.NonNull;

import java.util.Date;

@Data
public class UserInfo {
    private Integer id;
    @NotBlank(message = "用户姓名不能为空")
    private String userName;
    @NotBlank(message = "用户密码不能为空")
    private String password;
    @Lob
    private byte[] image;//存储图片的二进制
    private String imageType;
    private Integer deleteFlag;
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GTM+8")
    private Date updateTime;
}
